package thread;

public class TestThread2 implements Runnable {
    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            System.out.println("线程创建--"+i);
        }
    }

    public static void main(String[] args) {
        TestThread2 testThread2 = new TestThread2();

        //Thread thread = new Thread(testThread2);
        //thread.start();
        new Thread(testThread2).start();

        for (int i = 0; i < 100; i++) {
            System.out.println("主进程执行--"+i);
        }
    }
}
